package cn.dada.dadarecipes.mall.product.mapper;

import cn.dada.dadarecipes.mall.product.pojo.dto.ProductQuery;
import cn.dada.dadarecipes.mall.product.pojo.dto.ProductSelectParam;
import cn.dada.dadarecipes.mall.product.pojo.entity.Product;
import cn.dada.dadarecipes.mall.product.pojo.vo.ProductMerchantVO;
import cn.dada.dadarecipes.mall.product.pojo.vo.ProductVO;
import org.apache.ibatis.annotations.Param;
import cn.dada.dadarecipes.mall.shop.pojo.vo.ShopVO;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProductMapper {
    List<ProductVO> selectProduct(ProductQuery productQuery);

    List<ProductMerchantVO> selectMerchantProduct(ProductSelectParam productSelectParam);

    boolean addMerchantProduct(Product product);

    boolean updateMerchantProduct(Product product);

    boolean dropProduct(@Param("id") Long id,
                        @Param("shop_id") Long shop_id,
                        @Param("business_id") Long businessId);

    void update(ProductVO productVO);

}
